package com.yuncool.service;

import com.yuncool.domain.CommonTag;
import com.yuncool.mapper.CommonTagMapper;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommonTagService {

	@Resource
	private CommonTagMapper commonTagMapper;

	/**
	 * 标签列表
	 *
	 * @param parentId
	 * @return
	 */
	public List<CommonTag> listCommonTag(String parentId) {
		Example example = new Example(CommonTag.class);
		example.createCriteria().andEqualTo("parentId", parentId);
		return commonTagMapper.selectByExample(example);
	}

}
